import { CoolController, BaseController } from '@cool-midway/core';
import { GoodsClassEntity } from '../../entity/class';
import { GoodsClassService } from '../../service/class';

/**
 * 分类
 */
@CoolController({
  api: ['add', 'delete', 'update', 'info', 'list', 'page'],
  entity: GoodsClassEntity,
  service: GoodsClassService,
  listQueryOp: {
    keyWordLikeFields: ['name'],
  },
  pageQueryOp: {
    keyWordLikeFields: ['name'],
    fieldEq: ['parentId'],
    addOrderBy: {
      sortNum: 'asc',
    },
  },
})
export class AdminGoodsClassController extends BaseController {}
